package com.learning.spring.aop.aspectj.annotation.function;

import com.learning.spring.aop.aspectj.AopService;
import com.learning.spring.aop.aspectj.AopServiceImpl;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import org.springframework.context.annotation.EnableAspectJAutoProxy;

/**
 * ClassName: PointcutFunctionConfig
 * Description: 切点函数
 * Date: 2019/5/6 10:38 【需求编号】
 *
 * @author Sam Sho
 * @version V1.0.0
 */
@Configuration
@EnableAspectJAutoProxy
public class PointcutFunctionConfig {

    /**
     * 目标类
     *
     * @return
     */
    @Bean
    public AopService aopServiceTarget() {
        return new AopServiceImpl();
    }

    /**
     * 标注  @annotation 函数
     *
     * @return
     */
    @Bean
    public PointcutFunctionAspect annotationAdvice() {
        return new PointcutFunctionAspect();
    }
}
